import { requestClient } from '#/api/request';

export namespace DashboardApi {
  export interface TenantSummary {
    id: number;
    name: string;
    account_balance: number | string;
    invoiceable_amount: number | string;
  }

  export interface LandingCompanySummary {
    name: string;
    tax_number: string;
    bank_name: string;
    account_number: string;
    billing_categories: string[];
  }

  export interface OverviewResponse {
    tenant: TenantSummary;
    landing_companies: LandingCompanySummary[];
  }
}

export async function getDashboardOverviewApi() {
  return requestClient.get<DashboardApi.OverviewResponse>('/api/tenant/dashboard/overview');
}
